package com.he.principles.LKP;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.text.MessageFormat;

/**
 * @description: 经纪人类，将其他的类聚合在一起
 * @Author: HCL
 * @Date: 2024/8/22 15:14
 */
@Slf4j
@Data
@Builder
@AllArgsConstructor
public class Agent {

    private Star star;

    private Fans fans;

    private Company company;

    public void meeting() {
        log.info("明星{}和粉丝{}见面", star.getName(), fans.getName());
//        System.out.println(MessageFormat.format("明星{0}和粉丝{1}见面", star.getName(), fans.getName()));
    }

    public void business() {
        log.info("明星{}和公司{}洽谈", star.getName(), company.getName());
    }
}
